package com.hustzp.com.xichuangzhu.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.TextView;

import com.hustzp.com.xichuangzhu.XichuangzhuApplication;

/**
 * Created by fujiangren on 16/5/29.
 */
public class CustomTextView extends TextView {



    public CustomTextView(Context context) {
        super(context);

        if(0 == XichuangzhuApplication.getInstance().getFontStyle()){

            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenFangSong());
        }else{

            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenWyue());

        }

    }

    public CustomTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        if(0 == XichuangzhuApplication.getInstance().getFontStyle()){
            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenFangSong());
        }else{

            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenWyue());

        }
    }

    public CustomTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        if(0 == XichuangzhuApplication.getInstance().getFontStyle()){

            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenFangSong());
        }else{

            this.setTypeface(XichuangzhuApplication.getInstance().getTypefaceHuaWenWyue());

        }
    }
}
